Optimal. Leaf size=151 \[ \frac {23 a^{5/2} \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {a}}\right )}{4 d}-\frac {4 \sqrt {2} a^{5/2} \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{d}-\frac {9 i a^2 \cot (c+d x) \sqrt {a+i a \tan (c+d x)}}{4 d}-\frac {a^2 \cot ^2(c+d x) \sqrt {a+i a \tan (c+d x)}}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.29, antiderivative size = 151, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 8, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.308, Rules used = {3634, 3679,
3681, 3561, 212, 3680, 65, 214} \begin {gather*} \frac {23 a^{5/2} \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {a}}\right )}{4 d}-\frac {4 \sqrt {2} a^{5/2} \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{d}-\frac {a^2 \cot ^2(c+d x) \sqrt {a+i a \tan (c+d x)}}{2 d}-\frac {9 i a^2 \cot (c+d x) \sqrt {a+i a \tan (c+d x)}}{4 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 65
Rule 212
Rule 214
Rule 3561
Rule 3634
Rule 3679
Rule 3680
Rule 3681
Rubi steps
\begin {align*} \int \cot ^3(c+d x) (a+i a \tan (c+d x))^{5/2} \, dx &=-\frac {a^2 \cot ^2(c+d x) \sqrt {a+i a \tan (c+d x)}}{2 d}-\frac {1}{2} \int \cot ^2(c+d x) \sqrt {a+i a \tan (c+d x)} \left (-\frac {9 i a^2}{2}+\frac {7}{2} a^2 \tan (c+d x)\right ) \, dx\\ &=-\frac {9 i a^2 \cot (c+d x) \sqrt {a+i a \tan (c+d x)}}{4 d}-\frac {a^2 \cot ^2(c+d x) \sqrt {a+i a \tan (c+d x)}}{2 d}-\frac {\int \cot (c+d x) \sqrt {a+i a \tan (c+d x)} \left (\frac {23 a^3}{4}+\frac {9}{4} i a^3 \tan (c+d x)\right ) \, dx}{2 a}\\ &=-\frac {9 i a^2 \cot (c+d x) \sqrt {a+i a \tan (c+d x)}}{4 d}-\frac {a^2 \cot ^2(c+d x) \sqrt {a+i a \tan (c+d x)}}{2 d}-\frac {1}{8} (23 a) \int \cot (c+d x) (a-i a \tan (c+d x)) \sqrt {a+i a \tan (c+d x)} \, dx-\left (4 i a^2\right ) \int \sqrt {a+i a \tan (c+d x)} \, dx\\ &=-\frac {9 i a^2 \cot (c+d x) \sqrt {a+i a \tan (c+d x)}}{4 d}-\frac {a^2 \cot ^2(c+d x) \sqrt {a+i a \tan (c+d x)}}{2 d}-\frac {\left (23 a^3\right ) \text {Subst}\left (\int \frac {1}{x \sqrt {a+i a x}} \, dx,x,\tan (c+d x)\right )}{8 d}-\frac {\left (8 a^3\right ) \text {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,\sqrt {a+i a \tan (c+d x)}\right )}{d}\\ &=-\frac {4 \sqrt {2} a^{5/2} \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{d}-\frac {9 i a^2 \cot (c+d x) \sqrt {a+i a \tan (c+d x)}}{4 d}-\frac {a^2 \cot ^2(c+d x) \sqrt {a+i a \tan (c+d x)}}{2 d}+\frac {\left (23 i a^2\right ) \text {Subst}\left (\int \frac {1}{i-\frac {i x^2}{a}} \, dx,x,\sqrt {a+i a \tan (c+d x)}\right )}{4 d}\\ &=\frac {23 a^{5/2} \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {a}}\right )}{4 d}-\frac {4 \sqrt {2} a^{5/2} \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{d}-\frac {9 i a^2 \cot (c+d x) \sqrt {a+i a \tan (c+d x)}}{4 d}-\frac {a^2 \cot ^2(c+d x) \sqrt {a+i a \tan (c+d x)}}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 2.13, size = 182, normalized size = 1.21 \begin {gather*} -\frac {a^2 e^{-i (c+2 d x)} \sqrt {\frac {a e^{2 i (c+d x)}}{1+e^{2 i (c+d x)}}} \sqrt {1+e^{2 i (c+d x)}} \left (32 \sinh ^{-1}\left (e^{i (c+d x)}\right )-23 \sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {2} e^{i (c+d x)}}{\sqrt {1+e^{2 i (c+d x)}}}\right )+\sqrt {1+e^{2 i (c+d x)}} (9 i+2 \cot (c+d x)) \csc (c+d x)\right ) (\cos (d x)+i \sin (d x))}{4 \sqrt {2} d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 676 vs. \(2 (121 ) = 242\).
time = 0.83, size = 677, normalized size = 4.48
method | result | size |
default | \(\frac {\sqrt {\frac {a \left (i \sin \left (d x +c \right )+\cos \left (d x +c \right )\right )}{\cos \left (d x +c \right )}}\, \left (32 i \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \arctan \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sqrt {2}}{2}\right ) \left (\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right ) \sqrt {2}+23 i \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \arctan \left (\frac {1}{\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}}\right ) \left (\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )-32 \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \sqrt {2}}{2 \cos \left (d x +c \right )}\right ) \left (\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right ) \sqrt {2}-32 i \sqrt {2}\, \arctan \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sqrt {2}}{2}\right ) \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )-23 \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \ln \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )-\cos \left (d x +c \right )+1}{\sin \left (d x +c \right )}\right ) \left (\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )-23 i \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \arctan \left (\frac {1}{\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}}\right ) \sin \left (d x +c \right )+22 i \left (\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )+32 \sqrt {2}\, \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \sqrt {2}}{2 \cos \left (d x +c \right )}\right ) \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )-18 i \cos \left (d x +c \right ) \sin \left (d x +c \right )+23 \ln \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )-\cos \left (d x +c \right )+1}{\sin \left (d x +c \right )}\right ) \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )+22 \left (\cos ^{3}\left (d x +c \right )\right )-4 \left (\cos ^{2}\left (d x +c \right )\right )-18 \cos \left (d x +c \right )\right ) a^{2}}{8 d \left (-1+\cos \left (d x +c \right )\right ) \left (i \sin \left (d x +c \right )+\cos \left (d x +c \right )-1\right ) \left (1+\cos \left (d x +c \right )\right )}\) | \(677\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.49, size = 181, normalized size = 1.20 \begin {gather*} \frac {{\left (16 \, \sqrt {2} \sqrt {a} \log \left (-\frac {\sqrt {2} \sqrt {a} - \sqrt {i \, a \tan \left (d x + c\right ) + a}}{\sqrt {2} \sqrt {a} + \sqrt {i \, a \tan \left (d x + c\right ) + a}}\right ) - 23 \, \sqrt {a} \log \left (\frac {\sqrt {i \, a \tan \left (d x + c\right ) + a} - \sqrt {a}}{\sqrt {i \, a \tan \left (d x + c\right ) + a} + \sqrt {a}}\right ) + \frac {2 \, {\left (9 \, {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{\frac {3}{2}} a - 7 \, \sqrt {i \, a \tan \left (d x + c\right ) + a} a^{2}\right )}}{{\left (i \, a \tan \left (d x + c\right ) + a\right )}^{2} - 2 \, {\left (i \, a \tan \left (d x + c\right ) + a\right )} a + a^{2}}\right )} a^{2}}{8 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 558 vs. \(2 (116) = 232\).
time = 0.45, size = 558, normalized size = 3.70 \begin {gather*} -\frac {32 \, \sqrt {2} \sqrt {\frac {a^{5}}{d^{2}}} {\left (d e^{\left (4 i \, d x + 4 i \, c\right )} - 2 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (\frac {4 \, {\left (a^{3} e^{\left (i \, d x + i \, c\right )} + \sqrt {\frac {a^{5}}{d^{2}}} {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}\right )} e^{\left (-i \, d x - i \, c\right )}}{a^{2}}\right ) - 32 \, \sqrt {2} \sqrt {\frac {a^{5}}{d^{2}}} {\left (d e^{\left (4 i \, d x + 4 i \, c\right )} - 2 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (\frac {4 \, {\left (a^{3} e^{\left (i \, d x + i \, c\right )} - \sqrt {\frac {a^{5}}{d^{2}}} {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}\right )} e^{\left (-i \, d x - i \, c\right )}}{a^{2}}\right ) - 23 \, \sqrt {\frac {a^{5}}{d^{2}}} {\left (d e^{\left (4 i \, d x + 4 i \, c\right )} - 2 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (\frac {16 \, {\left (3 \, a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} + a^{3} + 2 \, \sqrt {2} \sqrt {\frac {a^{5}}{d^{2}}} {\left (d e^{\left (3 i \, d x + 3 i \, c\right )} + d e^{\left (i \, d x + i \, c\right )}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{a}\right ) + 23 \, \sqrt {\frac {a^{5}}{d^{2}}} {\left (d e^{\left (4 i \, d x + 4 i \, c\right )} - 2 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (\frac {16 \, {\left (3 \, a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} + a^{3} - 2 \, \sqrt {2} \sqrt {\frac {a^{5}}{d^{2}}} {\left (d e^{\left (3 i \, d x + 3 i \, c\right )} + d e^{\left (i \, d x + i \, c\right )}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{a}\right ) - 4 \, \sqrt {2} {\left (11 \, a^{2} e^{\left (5 i \, d x + 5 i \, c\right )} + 4 \, a^{2} e^{\left (3 i \, d x + 3 i \, c\right )} - 7 \, a^{2} e^{\left (i \, d x + i \, c\right )}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}}{16 \, {\left (d e^{\left (4 i \, d x + 4 i \, c\right )} - 2 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.00, size = 139, normalized size = 0.92 \begin {gather*} -\frac {\mathrm {atan}\left (\frac {\sqrt {a^5}\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}\,1{}\mathrm {i}}{a^3}\right )\,\sqrt {a^5}\,23{}\mathrm {i}}{4\,d}+\frac {7\,a^2\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}}{4\,d\,{\mathrm {tan}\left (c+d\,x\right )}^2}-\frac {9\,a\,{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^{3/2}}{4\,d\,{\mathrm {tan}\left (c+d\,x\right )}^2}+\frac {\sqrt {2}\,\mathrm {atan}\left (\frac {\sqrt {2}\,\sqrt {a^5}\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}\,1{}\mathrm {i}}{2\,a^3}\right )\,\sqrt {a^5}\,4{}\mathrm {i}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________